Skip to content

feat: add docker and docker-compose#18

Merged
khoshov merged 8 commits intodevelopfrom
feature/add_docker_and_doker_compose
Jun 15, 2025
Merged

feat: add docker and docker-compose#18
khoshov merged 8 commits intodevelopfrom
feature/add_docker_and_doker_compose

Conversation

@BerdyshevEugene
Copy link
Collaborator

No description provided.

# ======================
# SYSTEM DEPENDENCIES
# ======================
RUN apt-get update && \
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RUN apt-get update && \
    apt-get install -y --no-install-recommends curl gettext && \
    apt-get clean && rm -rf /var/lib/apt/lists/*

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лучше убрать совсем

Dockerfile Outdated
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/

# Ensure Python output is sent straight to terminal without buffering
ENV PYTHONUNBUFFERED=1
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ENV PYTHONUNBUFFERED=1 \
    PYTHONDONTWRITEBYTECODE=1

FROM python:3.13-slim-bookworm

# Install UV (ultra-fast Python package installer) from Astral.sh
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Зафиксировать версию UV

COPY --from=ghcr.io/astral-sh/uv:v0.1.33 /uv /uvx /bin/

BASE_DIR = Path(__file__).resolve().parent.parent

# SECURITY WARNING: don't run with debug turned on in production!
SECRET_KEY = DJANGO_SECRET_KEY
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Я бы сделал сразу
SECRET_KEY = os.getenv("DJANGO_SECRET_KEY")


# SECURITY WARNING: don't run with debug turned on in production!
SECRET_KEY = DJANGO_SECRET_KEY
DEBUG = True
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Заменить на переменную окружения

@BerdyshevEugene BerdyshevEugene force-pushed the feature/add_docker_and_doker_compose branch from 5fc910b to 294f11a Compare June 6, 2025 12:26
SECRET_KEY = DJANGO_SECRET_KEY
DEBUG = True

ALLOWED_HOSTS = []
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Заменить на переменную окружения

# Database
# https://docs.djangoproject.com/en/5.2/ref/settings/#databases

DATABASES = {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Заменить на переменную окружения

description = "Add your description here"
requires-python = ">=3.13"
dependencies = [
"django-ckeditor-5==0.2.17",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Пока должны остаться только

django-environ
django
psycopg2-binary

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/5.2/howto/static-files/

# =============
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Прогнать настройки через LLM (отформатировать)

- .env
volumes:
- ./:/app
- /app/.venv
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Добавить postgres с healthcheck

# ======================
# SYSTEM DEPENDENCIES
# ======================
RUN apt-get update && \
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лучше убрать совсем

@khoshov khoshov merged commit 8ccb617 into develop Jun 15, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments